<?php
/**
 * Created by PhpStorm.
 * User: tjjs
 * Date: 17-8-10
 * Time: 下午5:34
 */

namespace ActionsHttp;

use Data\Restaurant_withdraws_DAO;

class RestaurantWithdrawsListIng extends BaseActionHttp
{
    public function doAction() {
        parent::doAction();
        // 商铺id
        $restaurant_id = $_SESSION[RESTAURANT_ID];
        $restaurant_id = 1;

        // 每页显示条数
        $every_page_counts = (int)$this->data[EVERY_PAGE_COUNTS];
        // 页码
        $page_index = (int)$this->data[PAGE_INDEX];
        // 起始值
        $list_start = ($page_index-1)*$every_page_counts;

        $withdraws_status = STATE_NO;

        // 提现列表
        $withdraws_list = Restaurant_withdraws_DAO::getListByRestaurantId($restaurant_id,$withdraws_status,$list_start,$every_page_counts);

        // 返回数据
        $this->setValue(WITHDRAWS_LIST_ING,$withdraws_list);
        $this->ResponseDataToCurrentClient();
    }
}